#include "key.h"
#include "main.h"
#include "stm32f4xx.h"
uint8_t MotorStart_KeyState=0;
uint8_t Get_Key1_Status(void)
{
    uint8_t Retval=0;
    if(HAL_GPIO_ReadPin(KEY1_GPIO_Port,KEY1_Pin)==GPIO_PIN_RESET)
    {
        HAL_Delay(20);
        if(HAL_GPIO_ReadPin(KEY1_GPIO_Port,KEY1_Pin)==GPIO_PIN_RESET)
        {
            Retval=1;
        }
    }
    return Retval;
}

void Set_MotorStart_KeyState(uint8_t val)
{
    MotorStart_KeyState=val;
}

uint8_t Get_MotorStart_KeyState(void)
{
    return MotorStart_KeyState;
}